﻿<phone:PhoneApplicationPage
    x:Class="DiamondDash.Pages.ReadyPage"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:phone="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone"
    xmlns:shell="clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
	xmlns:my="clr-namespace:DiamondDash.Views"
    FontFamily="{StaticResource PhoneFontFamilyNormal}"
    FontSize="{StaticResource PhoneFontSizeNormal}"
    Foreground="{StaticResource PhoneForegroundBrush}"
    SupportedOrientations="Portrait" Orientation="Portrait"
    mc:Ignorable="d"
    shell:SystemTray.IsVisible="False">
	<phone:PhoneApplicationPage.Resources>
		<Style x:Key="ButtonStyleStart" TargetType="Button">
			<Setter Property="Template">
				<Setter.Value>
					<ControlTemplate TargetType="Button">
						<Grid>
							<VisualStateManager.VisualStateGroups>
								<VisualStateGroup x:Name="CommonStates">
									<VisualState x:Name="Pressed">
										<Storyboard>
											<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="image">
												<DiscreteObjectKeyFrame KeyTime="0">
													<DiscreteObjectKeyFrame.Value>
														<Visibility>Collapsed</Visibility>
													</DiscreteObjectKeyFrame.Value>
												</DiscreteObjectKeyFrame>
											</ObjectAnimationUsingKeyFrames>
											<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="image1">
												<DiscreteObjectKeyFrame KeyTime="0">
													<DiscreteObjectKeyFrame.Value>
														<Visibility>Visible</Visibility>
													</DiscreteObjectKeyFrame.Value>
												</DiscreteObjectKeyFrame>
											</ObjectAnimationUsingKeyFrames>
										</Storyboard>
									</VisualState>
									<VisualState x:Name="Normal"/>
									<VisualState x:Name="Disabled"/>
									<VisualState x:Name="MouseOver"/>
								</VisualStateGroup>
								<VisualStateGroup x:Name="FocusStates">
									<VisualState x:Name="Focused"/>
								</VisualStateGroup>
							</VisualStateManager.VisualStateGroups>
							<Image x:Name="image" Source="/Images/btnStart.png" Stretch="Fill"/>
							<Image x:Name="image1" Source="/Images/btnStartPress.png" Stretch="Fill" Visibility="Collapsed"/>
						</Grid>
					</ControlTemplate>
				</Setter.Value>
			</Setter>
		</Style>
		<Style x:Key="ButtonStyleSoundOff" TargetType="Button">
			<Setter Property="Template">
				<Setter.Value>
					<ControlTemplate TargetType="Button">
						<Grid Background="#02FFFFFF">
							<VisualStateManager.VisualStateGroups>
								<VisualStateGroup x:Name="CommonStates">
									<VisualState x:Name="Normal"/>
									<VisualState x:Name="Disabled"/>
									<VisualState x:Name="MouseOver"/>
								</VisualStateGroup>
								<VisualStateGroup x:Name="FocusStates">
									<VisualState x:Name="Focused"/>
								</VisualStateGroup>
							</VisualStateManager.VisualStateGroups>
							<Image Source="/Images/sound_mute.png" Stretch="Fill"/>
						</Grid>
					</ControlTemplate>
				</Setter.Value>
			</Setter>
		</Style>
		<Style x:Key="ButtonStyleSoundOn" TargetType="Button">
			<Setter Property="Template">
				<Setter.Value>
					<ControlTemplate TargetType="Button">
						<Grid Background="#02FFFFFF">
							<VisualStateManager.VisualStateGroups>
								<VisualStateGroup x:Name="CommonStates">
									<VisualState x:Name="Normal"/>
									<VisualState x:Name="Disabled"/>
									<VisualState x:Name="MouseOver"/>
								</VisualStateGroup>
								<VisualStateGroup x:Name="FocusStates">
									<VisualState x:Name="Focused"/>
								</VisualStateGroup>
							</VisualStateManager.VisualStateGroups>
							<Image Source="/Images/sound_high.png" Stretch="Fill"/>
						</Grid>
					</ControlTemplate>
				</Setter.Value>
			</Setter>
		</Style>
	</phone:PhoneApplicationPage.Resources>

    <!--LayoutRoot 是包含所有页面内容的根网格-->
    <Grid x:Name="LayoutRoot" Background="Transparent">
    	<Image Source="/Images/NewGamePage.png" Stretch="Fill"/>
    	<TextBlock HorizontalAlignment="Left" Margin="79,16,0,0" TextWrapping="Wrap" Text="{Binding Text, ElementName=txtCoinCount}" VerticalAlignment="Top" FontFamily="Segoe WP Black" FontSize="40" Foreground="Black" RenderTransformOrigin="0.5,0.5">
    		<TextBlock.RenderTransform>
    			<CompositeTransform TranslateX="3" TranslateY="2"/>
    		</TextBlock.RenderTransform>
    	</TextBlock>
    	<TextBlock x:Name="txtCoinCount" HorizontalAlignment="Left" Margin="79,16,0,0" TextWrapping="Wrap" Text="1000000" VerticalAlignment="Top" FontFamily="Segoe WP Black" FontSize="40" Foreground="White"/>
		<my:LevelProgressView x:Name="levelProgress" HorizontalAlignment="Left" Margin="299,6,0,0" VerticalAlignment="Top"/>
		<TextBlock HorizontalAlignment="Right" Margin="0,113,51,0" TextWrapping="Wrap" Text="{Binding Text, ElementName=txtHighScore}" VerticalAlignment="Top" TextAlignment="Right" FontFamily="Segoe WP Black" FontSize="34.667" Foreground="Black" RenderTransformOrigin="0.5,0.5">
			<TextBlock.RenderTransform>
				<CompositeTransform TranslateX="3" TranslateY="2"/>
			</TextBlock.RenderTransform>
		</TextBlock>
		<TextBlock x:Name="txtHighScore" HorizontalAlignment="Right" Margin="0,113,51,0" TextWrapping="Wrap" Text="8888888" VerticalAlignment="Top" TextAlignment="Right" FontFamily="Segoe WP Black" FontSize="34.667" Foreground="White"/>
		<Button x:Name="btnStart" Content="Button" Margin="0,571,0,0" Style="{StaticResource ButtonStyleStart}" HorizontalAlignment="Center" Width="205" Height="93" VerticalAlignment="Top" Click="btnStart_Click"/>
		<StackPanel Margin="28,202,0,0" Orientation="Vertical" HorizontalAlignment="Left" VerticalAlignment="Top">
			<my:ToolSelector x:Name="toolBomb" HorizontalAlignment="Left" VerticalAlignment="Top" ToolType="1"/>
			<my:ToolSelector x:Name="toolTime" HorizontalAlignment="Left" VerticalAlignment="Top" ToolType="2" Margin="0,10,0,0"/>
			<my:ToolSelector x:Name="toolColor" HorizontalAlignment="Left" VerticalAlignment="Top" ToolType="3" Margin="0,10,0,0"/>
		</StackPanel>
		<Button x:Name="btnSoundOff" Click="btnSoundOff_Click" Content="Button" Margin="12,743,420,9" Style="{StaticResource ButtonStyleSoundOff}" Visibility="Collapsed"/>
		<Button x:Name="btnSoundOn" Click="btnSoundOn_Click" Content="Button" Margin="12,743,420,9" Style="{StaticResource ButtonStyleSoundOn}"/>
        <!--TitlePanel 包含应用程序的名称和页标题-->

        <!--ContentPanel - 在此处放置其他内容-->
    </Grid>

</phone:PhoneApplicationPage>